<div class="container" ng-controller="queryUsersController">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="col-sm-6">
                <span class="glyphicon glyphicon-user">&nbsp;管理员管理&nbsp;</span>
                <span class="glyphicon glyphicon-chevron-right">&nbsp;查看管理员信息&nbsp;</span>
            </div>
            <div class="col-sm-6">
                <div class="col-sm-10">
                    <searchfilter selected-filter="selctedFilter" filter-str="filterStr" filter-types="filterTypes"></searchfilter>
                </div>
                <div class="col-sm-2 ">
                    <button type="button" class="btn btn-default" ng-click="addManager()">
                        <span class="glyphicon glyphicon-plus">添加</span>
                    </button>
                </div>
            </div>
        </div>
    </div>
    <table class="table table-striped" ng-init="getManagers()">
        <tr>
            <th></th>
            <th>管理员账号</th>
            <th>描述</th>
            <th>创建时间</th>
            <th>更新时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        <tr ng-repeat="item in aManagers | filter: myFilter">
            <td>{{$index+startIndex}}</td>
            <td>{{item.name}}</td>
            <td>{{item.info}}</td>
            <td>{{item.createTime| date: 'yyyy-MM-dd HH:mm:ss'}}</td>
            <td>{{item.updateTime| date: 'yyyy-MM-dd HH:mm:ss'}}</td>
            <td ng-switch="item.status">
                <span ng-switch-when="1">激活</span>
                <span ng-switch-default>禁用</span>
            </td>
            <td ng-switch="item.status">
                <a ui-sref="authority/managers/editManager({id: item.id, name:item.name, info:item.info })">修改</a>&emsp;
                <a ui-sref="authority/managers/associateRole({id: item.id, name: item.name})">关联角色</a>&emsp;
                <a href="javascript:;" data-toggle="modal" data-target="#confirmDeleteModal" ng-click="updateDeleteId(item.id)">删除</a>&emsp;
                <a href="javascript:;" ng-click="resetManagerPwd(item.id)">重置密码</a>&emsp;
                <a href="javascript:;" ng-click="updateManagerStatus(item.status, item.id, item.name)" ng-switch-when="1">禁用</a>
                <a href="javascript:;" ng-click="updateManagerStatus(item.status, item.id, item.name)" ng-switch-when="0">激活</a>
            </td>
            <confirmdeletemodal></confirmdeletemodal>
        </tr>
    </table>
    <pagination page-size="pageSize" page-no="pageNo" total-size="{{nTotalSize}}" page-nums="{{nPageNums}}" start-index={{startIndex}} end-index={{lastIndex}} refresh-method="getManagers()"></pagination>
</div>